package hydrap2p.library;

import java.util.List;

public interface Hasher {
	/**
	 * Calculates the hash for the given range on the given shared item 
	 * Throws an exception if something bad happens, which usually signals that this Hasher no longer works
	 * @param filename
	 * @return
	 * @throws Exception
	 */
	public String getHash(SharedItemInfo item, Range range) throws Exception;
	/**
	 * Calculates any available hashes for this shared item
	 * Throws an exception if something bad happens, which usually signals that this Hasher no longer works
	 * @param filename
	 * @return
	 * @throws Exception
	 */
	public List<HashData> getHashes(SharedItemInfo item) throws Exception;
}
